﻿Public Class SaglikKarnesiListe
    Inherits ProcessReport

    Public Overrides Sub GenericEvent(ByVal e As ProcessEventArgs)
        Select Case e.EventType
            Case EventType.Initialize
				Text = "Verilen Karne Listesi"
                InitialHelp = "Sigortalı bilgisini ve tarih aralığını girin."
                AddSigortali()
                AddDateRange("Tarih", "nl", YMD(Today.AddYears(-1)), YMD(Today))
            Case EventType.ValidateForm
                Rs = Sigortali.SaglikKarnesi.KarneListesi(Remote, Input("Sigortali"), Input("Tarih1"), Input("Tarih2"))
                e.Result = True
            Case EventType.ReportHeader
                Report.PrintHeader("Sağlık Karnesi Listesi")
			Case EventType.PageHeader
				Report.SetColumns("Kimlik No.;Sigorta No.;Karne Türü;Baş.Tar.;Bit.Tar.;İşlem Tar.", "1;1;2;1;1;1", "c;c;l;d;d;d", "--")
            Case EventType.ReportDetail
                Do Until Rs.EOF
                    Report.Print(Rs("kimlik"), Rs("sno"), Choose(IsNull(Rs("tur"), 4) + 1, "Hastane (K)", "Eczane (K)", "Hastane (GY)", "Eczane (GY)"), Rs("bastar"), Rs("bittar"), Rs("islemtar"))
                    Rs.MoveNext()
				Loop
        End Select
    End Sub

End Class
